﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MenuList.aspx.cs" Inherits="School.SystemManage.WebPages.Menu.MenuList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../../css/right.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .td01{ width:10%;}
        .td02{ width:65%;}
        .td03{ width:10%;}
        .td04{ width:15%;}
        .attention{ color:Red; padding:10px;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
        <div class="title_bg">
            <div class="floatLeft title_text_div">主导航管理 > 导航列表</div> 
            <ul class="floatRight">
            </ul>
            <div class="clear"></div>
        </div>
        <div class="attention">注意：一般情况下请不要随意更改“连接URL”的值。</div>
        <div>
            <asp:ListView ID="lv_pmenu" runat="server" DataKeyNames="Categories" 
                ItemPlaceholderID="PlaceHolder1" onitemdatabound="lv_pmenu_ItemDataBound" 
                onitemcanceling="lv_pmenu_ItemCanceling" onitemediting="lv_pmenu_ItemEditing" 
                onitemupdating="lv_pmenu_ItemUpdating">
                <LayoutTemplate>
                    <table cellspacing="0" class="dataTable">
                        <tr>
                            <th class="td01">名称</th>
                            <th class="td02">连接URL</th>
                            <th class="td03">排序</th>
                            <th class="td04">操作</th>
                        </tr>
                        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("Name") %></td>
                        <td><%#Eval("LinkUrl") %></td>
                        <td><%#Eval("MOrder") %></td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">编辑</asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <asp:ListView ID="lv_smenu" runat="server" DataKeyNames="Categories,ParentCategory" ItemPlaceholderID="PlaceHolder2"
                                onitemcanceling="smenulv_ItemCanceling" onitemediting="smenulv_ItemEditing" 
                                onitemupdating="smenulv_ItemUpdating">
                                <LayoutTemplate>
                                    <table cellspacing="0" class="dataTable">
                                        <tr>
                                            <th colspan="4">子导航</th>
                                        </tr>
                                        <asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder>
                                    </table>                                   
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td class="td01"><%#Eval("Name") %></td>
                                        <td class="td02"><%#Eval("LinkUrl") %></td>
                                        <td class="td03"><%#Eval("MOrder") %></td>
                                        <td class="td04"><asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">编辑</asp:LinkButton></td>
                                    </tr>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <tr>
                                        <td class="td01"><%#Eval("Name") %></td>
                                        <td class="td02"><asp:TextBox ID="txbUrl" runat="server" Text='<%#Eval("LinkUrl") %>' Width="400"></asp:TextBox></td>
                                        <td class="td03"><asp:TextBox ID="txbOrder" runat="server" Text='<%#Eval("MOrder") %>' Width="50"></asp:TextBox></td>
                                        <td class="td04">
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">更新</asp:LinkButton>
                                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                                        </td>
                                    </tr>
                                </EditItemTemplate>
                            </asp:ListView>
                        </td>
                    </tr>
                </ItemTemplate>
                <EditItemTemplate>
                    <tr>
                        <td><%#Eval("Name") %></td>
                        <td><asp:TextBox ID="txbUrl" runat="server" Text='<%#Eval("LinkUrl") %>' Width="500"></asp:TextBox></td>
                        <td><asp:TextBox ID="txbOrder" runat="server" Text='<%#Eval("MOrder") %>' Width="50"></asp:TextBox></td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">更新</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <asp:ListView ID="lv_smenu" runat="server" DataKeyNames="Categories" ItemPlaceholderID="PlaceHolder2">
                                <LayoutTemplate>
                                    <table cellspacing="0" class="dataTable">
                                        <tr>
                                            <th colspan="4">子导航</th>
                                        </tr>
                                        <asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder>
                                    </table>                                   
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td class="td01"><%#Eval("Name") %></td>
                                        <td class="td02"><%#Eval("LinkUrl") %></td>
                                        <td class="td03"><%#Eval("MOrder") %></td>
                                        <td class="td04"></td>
                                    </tr>
                                </ItemTemplate>                                
                            </asp:ListView>
                        </td>
                    </tr>
                </EditItemTemplate>
            </asp:ListView>
        </div>
    </div>
    </form>
</body>
</html>
